import React, { Component } from 'react';
import "./style.scss"
class List extends Component {
    handClick(){
        window.location.reload()
    }
    render() {
        const { list } = this.props
        console.log(list)
        return (
            <div className='box'>
                <h1><span>搜索热点</span><b onClick={()=>this.handClick()}>换一换</b></h1>
                {console.log(list)}
                <ul className='wrap'>
                    {
                        list.length > 0 && list.map(v => {
                            return (
                                <li key={v.id}><span>{v.title}</span><b>{v.count}</b></li>
                            )
                        })
                    }
                </ul>
            </div>
        );
    }
}

export default List;

